//
//  KABExhibitionModel.h
//  kabu
//
//  Created by XiangDongMBP on 2017/2/10.
//  Copyright © 2017年 East. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <YYModel.h>

#pragma mark - 展会列表

// 展会详情嘉宾Item
@interface KABExhDetGuestItem : NSObject<NSCoding>
@property (nonatomic, assign) NSInteger guest_id;       //!< @"id"--@"guest_id" 展会Id
@property (nonatomic, copy)   NSString *image_url;      //!< 图片链接
@property (nonatomic, copy)   NSString *guest_name;     //!< 嘉宾姓名
@property (nonatomic, copy)   NSString *introduce;      //!< 嘉宾介绍
@end

// 票价信息
@interface KABExhDetTicketItem : NSObject<NSCoding>
@property (nonatomic, assign) NSInteger ticket_id;          //!< @"id"--@"ticket_id" 门票Id
@property (nonatomic, copy)   NSString *content;            //!< 门票内容
@property (nonatomic, assign) NSInteger original_price;     //!< 门票原价
@property (nonatomic, assign) NSInteger discounted_price;   //!< 门票折后价
@property (nonatomic, assign) NSInteger stock;              //!< 余票

@end


// 展会列表Item
@interface KABExhListItem : NSObject<NSCoding>
@property (nonatomic, assign) NSInteger exhibition_id;      //!< @"id"--@"exhibition_id" 展会Id
@property (nonatomic, copy)   NSString *name;               //!< 展会名称
@property (nonatomic, copy)   NSString *start_time;         //!< 展会开展时间
@property (nonatomic, copy)   NSString *end_time;           //!< 展会结束时间
@property (nonatomic, copy)   NSString *province;           //!< 展会省份
@property (nonatomic, copy)   NSString *city;               //!< 展会城市
@property (nonatomic, copy)   NSString *district;           //!< 展会区(县)
@property (nonatomic, copy)   NSString *address;            //!< 展会详细地址
@property (nonatomic, copy)   NSString *cover_image_url;    //!< 封面图片地址
@property (nonatomic, copy)   NSString *purchase_time;      //!< 购票时间
@property (nonatomic, copy)   NSString *stop_purchase_time; //!< 停止购票时间
@property (nonatomic, assign) BOOL is_buyable;              //!< 是否可以购票，0-否 1-是
@property (nonatomic, assign) BOOL is_collected;            //!< 是否已关注，0-否 1-是

// 该属性只在详情页面才有
@property (nonatomic, copy)   NSString *note;               //!< 展会备注
@property (nonatomic, assign) NSInteger limited;            //!< 单词最多购买的张数
@property (nonatomic, strong) NSArray<KABExhDetGuestItem *> *special_guest_list;  //!< 嘉宾列表
@property (nonatomic, strong) NSArray<KABExhDetTicketItem *> *exhibition_ticket_list;  //!< 票价
@property (nonatomic, assign) NSInteger number;             //!< 购买门票的数量
@property (nonatomic, assign) NSInteger ticket_id;          //!< 购买门票的类型
@property (nonatomic, readonly) NSInteger selOriginalPrice;   //!< 选择的门票原件
@property (nonatomic, readonly) NSInteger selDiscountedPrice; //!< 选择的门票折后价
@property (nonatomic, readonly) NSInteger selMaxTicketCnt;    //!< 选择的最多可购票数
@property (nonatomic, readonly) NSInteger selStock;           //!< 选择的门票类型的库存
@property (nonatomic, readonly) NSString *selTicketType;      //!< 选择的门票的类型
@property (nonatomic, readonly) NSInteger totalPrice;         //!< 总共的价格
@property (nonatomic, readonly) NSString *priceTypeDesStr;    //!< 所有的价格描述

@end

// 展会列表
@interface KABExhibitionModel : NSObject<NSCoding>
@property (nonatomic, assign) NSInteger total_rows;
@property (nonatomic, strong) NSMutableArray<KABExhListItem *> *exhibition_list;

@property (nonatomic, readonly) BOOL totalLoad;
- (void)addMoreWithData:(KABExhibitionModel *)temp;
@end


#pragma mark - 展会详情
//@interface KABExhDetail : NSObject
//@property (nonatomic, assign) NSInteger exhibitonId;        //!< @"id"----@"exhibitonId" 展会Id
//@property (nonatomic, copy)   NSString *name;               //!< 展会名称
//@property (nonatomic, copy)   NSString *start_time;         //!< 展会开展时间
//@property (nonatomic, copy)   NSString *end_time;           //!< 展会结束时间
//@property (nonatomic, copy)   NSString *province;           //!< 展会省份
//@property (nonatomic, copy)   NSString *city;               //!< 展会城市
//@property (nonatomic, copy)   NSString *district;           //!< 展会区(县)
//@property (nonatomic, copy)   NSString *address;            //!< 展会详细地址
//@property (nonatomic, copy)   NSString *cover_image_url;    //!< 封面图片地址
//@property (nonatomic, copy)   NSString *introduce;          //!< 展会详情
//@property (nonatomic, copy)   NSString *purchase_time;      //!< 购票时间
//@property (nonatomic, copy)   NSString *stop_purchase_time; //!< 停止购票时间
//@property (nonatomic, assign) BOOL is_buyable;              //!< 是否可以购票， 0-否 1-是
//@property (nonatomic, assign) BOOL is_collected;            //!< 是否已关注，0-否 1-是
//@end



#pragma mark - 展会门票列表
// 展会门票详情
@interface KABExhOrderDetail : NSObject
@property (nonatomic, copy)   NSString *orderId;                //!< @"id"----@"orderId" 订单号
@property (nonatomic, copy)   NSString *phone_number;           //!< 手机号
@property (nonatomic, copy)   NSString *exhibition_name;        //!< 展会名称
@property (nonatomic, copy)   NSString *exhibition_starttime;   //!< 展会开展时间
@property (nonatomic, copy)   NSString *exhibition_endtime;     //!< 展会结束时间
@property (nonatomic, copy)   NSString *exhibition_address;     //!< 展会详细地址
@property (nonatomic, copy)   NSString *exhibition_cover_image_url;//!< 封面图片地址
@property (nonatomic, copy)   NSString *ticket_type;            //!< 门票类型
@property (nonatomic, assign) NSInteger price;                  //!< 价格
@property (nonatomic, assign) NSInteger number;                  //!< 数量
@property (nonatomic, assign) NSInteger total_price;            //!< 总价
@property (nonatomic, copy)   NSString *create_time;            //!< 订单生成时间
@property (nonatomic, copy)   NSString *qr_code_url;            //!< 二维码url
@property (nonatomic, copy)   NSString *serial_number;          //!< 序列号
@property (nonatomic, copy)   NSString *check_code;             //!< 验证码

//验证展会门票
@property (nonatomic, assign) BOOL check_result;                //!< 验证结果：0-失败 1-成功
@property (nonatomic, assign) BOOL is_expired;                  //!< 过期结果：0-未结束 1-已结束
@end

// 展会门票列表Item
@interface KABExhOrderListItem : NSObject
@property (nonatomic, assign) NSInteger orderId;                   //!< @"id"--@"orderId" 订单号
@property (nonatomic, copy)   NSString *exhibition_name;           //!< 展会名称
@property (nonatomic, copy)   NSString *exhibition_cover_image_url;//!< 封面图片地址
@property (nonatomic, assign) NSInteger price;                     //!< 价格
@property (nonatomic, assign) NSInteger number;                    //!< 数量
@property (nonatomic, assign) NSInteger total_price;               //!< 总价
@property (nonatomic, copy)   NSString *create_time;               //!< 订单生成时间
@property (nonatomic, assign) BOOL is_expired;                  //!< 过期结果：0-未结束 1-已结束
@end

// 展会门票列表
@interface KABExhibitionOrder : NSObject
@property (nonatomic, assign) NSInteger total_rows;
@property (nonatomic, strong) NSMutableArray<KABExhOrderDetail *> *exhibition_order_list;

@property (nonatomic, readonly) BOOL totalLoad;
- (void)addMoreWithData:(KABExhibitionOrder *)temp;
@end


#pragma mark - 门票校验结果
@interface KABExhOrderCheckResult : NSObject
@property (nonatomic, assign) NSInteger err_code;
@property (nonatomic, copy)   NSString *msg;
@property (nonatomic, strong) KABExhOrderDetail *result;
@end


#pragma mark - 展会搜索
@interface KABExhSearchItem : NSObject
@property (nonatomic, assign) NSInteger exhibition_id;             //!< 展会ID
@property (nonatomic, copy)   NSString *exhibition_name;           //!< 展会名称
@property (nonatomic, copy)   NSString *exhibition_cover_image_url;//!< 封面图片地址
@end

@interface KABExhSearchList : NSObject
@property (nonatomic, assign) NSInteger total_rows;
@property (nonatomic, strong) NSMutableArray<KABExhSearchItem *> *exhibition_list;

@property (nonatomic, readonly) BOOL totalLoad;
- (void)addMoreWithData:(KABExhSearchList *)temp;
@end
